#ifndef _CLOCK_H
#define _CLOCK_H
typedef struct Clock {
    double pts;           /* clock base */
    double pts_drift;     /* clock base minus time at which we updated the clock */
    double last_updated;
    double speed;
    int serial;           /* clock is based on a packet with this serial */
    int paused;
    int *queue_serial;    /* pointer to the current packet queue serial, used for obsolete clock detection */
} Clock;
typedef struct VideoState VideoState;

void init_clock(Clock *c, int *queue_serial);
double get_clock(Clock *c);
void set_clock_at(Clock *c, double pts, int serial, double time);
void set_clock(Clock *c, double pts, int serial);
 void set_clock_speed(Clock *c, double speed);
void sync_clock_to_slave(Clock *c, Clock *slave);
void check_external_clock_speed(VideoState *is);
double get_master_clock(VideoState *is);
int get_master_sync_type(VideoState *is);

#endif
